package com.ruoyi.web.controller.system;

import com.ruoyi.system.domain.Word;
import com.ruoyi.system.service.IWordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 单词Controller
 *
 * @author ruoyi
 */

@RestController
@RequestMapping("/system/word")
public class WordController {
    @Autowired
    private IWordService wordService;

    @GetMapping("/list")
    public List<Word> listWords(@RequestParam Long categoryId) {
        return wordService.getWordsByCategoryId(categoryId);
    }
}
